package com.esd.device.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.datatype.jsr310.ser.LocalDateTimeSerializer;
import com.github.liaochong.myexcel.core.annotation.ExcelColumn;
import com.github.liaochong.myexcel.core.annotation.ExcelModel;
import com.github.liaochong.myexcel.core.annotation.IgnoreColumn;
import lombok.Data;

import java.time.LocalDateTime;

@Data
@TableName("tb_esd_log_detail")
@ExcelModel(sheetName = "测量数据")
public class EsdLogDetail {
    @TableId(value = "id", type = IdType.AUTO)
    @IgnoreColumn
    private Long id ;
    @ExcelColumn(title = "终端名称",index = 0)
    private String deviceTypeName ;
    @ExcelColumn(order = 1, title = "终端ID",index = 1)
    private String stationId ;
    @ExcelColumn(order = 2, title = "通道名称",index = 2)
    private String channelName ; // 待定
    @ExcelColumn(order = 3, title = "生产线",index = 3)
    private String lineName ;
    @ExcelColumn(order = 4, title = "通道编号",index = 4)
    private Integer channel ; // 编号 待定
    @ExcelColumn(order = 5, title = "工位",index = 5)
    private String position ; // 位置 待定
    @ExcelColumn(order = 6, title = "状态",index = 6)
    private String status ; // 待定
    @ExcelColumn(order = 7, title = "状态详情",index = 7)
    private String statusDetail ; // 待定
    @ExcelColumn(order = 8, title = "测量值",index = 8)
    private String numAndUnit ; // 待定
    @ExcelColumn(order = 9, title = "记录时间",index = 9)
    @JsonSerialize(using = LocalDateTimeSerializer.class)
    @JsonFormat(locale = "zh", timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime markTime ;
}
